﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using Business;
using Domain;
using System.IO;

namespace HotelBrisaYArenaAdministrador
{
    public partial class ModPaginaComoLlegar : System.Web.UI.Page
    {
        
        ImagenBusiness imagenBusiness1 = new ImagenBusiness(WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
        SeccionBusiness seccionBusiness = new SeccionBusiness(WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
        Seccion seccion = new Seccion();
        int idSeccion1, idPagina1;
      
        protected void Page_Load(object sender, EventArgs e)
        {
              
           seccion = seccionBusiness.GetSeccion(3);

            if(!Page.IsPostBack){

                txbTexto1.Text = seccion.Descripcion;
                idSeccion1 = seccion.IdSeccion;
                idPagina1 = seccion.IdPagina; 
                }
               
        
      }

        protected void txbTexto1_TextChanged(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            String descripcion = txbTexto1.Text;

            seccionBusiness.ActualizarDescripcionSeccion(descripcion, idPagina1, idSeccion1);
            Response.Redirect("PaginaPrincipal.aspx");
        }

    }
}